<?php


namespace App\Transformer;


use App\Models\Department;
use League\Fractal\TransformerAbstract;

class DepartmentTransformer extends TransformerAbstract
{

    public function transform(Department $data)
    {
        return [
            'id' => $data->id,
            'name' => $data->name,
            'parent_id' => $data->parent_id
        ];
    }
}
